package Box2D.Collision
{
	import Box2D.Common.Math.b2Vec2;
	import Box2D.Common.b2Settings;
	import Box2D.Common.b2Wrapper;
	
	public class b2Manifold extends b2Wrapper
	{
		public static const e_circles:int = 0;
		public static const e_faceA:int = 1;
		public static const e_faceB:int = 2;
		
		private var _points:Vector.<b2ManifoldPoint>;
		private var _localNormal:b2Vec2;
		private var _localPoint:b2Vec2;		
		public function b2Manifold(wrapper:Object=null)
		{
			if(wrapper==null)
				wrapper=callDirect('b2Manifold_new');
			super(wrapper);
			_points = new Vector.<b2ManifoldPoint>;
			for(var i:int=0;i<b2Settings.b2_maxManifoldPoints;i++){
				_points.push(new b2ManifoldPoint(wrapper+i*20));
			}
			_localNormal = new b2Vec2(0,0,wrapper+40);
			_localPoint = new b2Vec2(0,0,wrapper+48);
		}
		public function get type():int{return getInt(56)}
		public function get pointCount():int{return getInt(60)}
		public function get points():Vector.<b2ManifoldPoint>{return _points}
	}
}